package com.example.mapdata.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.mapdata.dao.ShopDao;
import com.example.mapdata.entity.Shop;
import com.example.mapdata.service.ShopService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Shop)表服务实现类
 *
 * @author makejava
 * @since 2024-09-20 10:56:14
 */
@Service("shopService")
public class ShopServiceImpl implements ShopService {
    @Resource
    private ShopDao shopDao;


    /**
     * 通过城市编号和区域编号查询商店
     *
     * @param cityId
     * @param areaId
     * @return
     */
    @Override
    public List<Shop> getShopByCityAndDistrict(String cityId, String areaId) {
        QueryWrapper qw = new QueryWrapper<>();
        qw.eq("city_id", cityId);
        qw.eq("area_id", areaId);
        List list = shopDao.selectList(qw);
        return list;
    }
}
